CC    NNEWY - This function finds new y coordinates.

      INTEGER*2 FUNCTION nnewy( YI )

      INTEGER*2       xwidth, yheight, cols, rows
      INTEGER*2       X0, Y0
      REAL*4          RATEX, RATEY, YI, XP, YP
      REAL*4          tempY, dy
      COMMON /val/    xwidth, yheight, cols, rows
      COMMON /XYRATE/ X0, Y0, RATEX, RATEY, XP, YP
      COMMON /DY/     dy

      tempy = ( YI - Y0 ) * RATEY
      tempy = yheight - ( tempy + yheight * dy )
      nnewy = tempy
      END
